<?php 
define('RUN_KATANA', true);
require('../../includes/config.php');
$orderid   = intval($_REQUEST['orderid']);
$com	   = 16;
if(intval($_REQUEST['c']) > 0)
{ $com = intval($_REQUEST['c']); }

if($_REQUEST['edit'] != '')
{ $edit =  'edit='.$_REQUEST['edit']; }
if(intval($_REQUEST['ad']) > 0)
{ $ad =  '&ad='.intval($_REQUEST['ad']); }

if(($edit != '') && ($ad != ''))
{ $CancelURL = SITE_URL.'c/'.$com.'/?'.$edit.$ad; }
else
{ $CancelURL = SITE_URL.'c/'.$com.'/?action=payment&cancel=1&orderid='.$orderid.$edit.$ad; }

header('Location: '.$CancelURL);
?>